The Internet protocol (IP) enables the transmission of data between two network nodes by assigning IP addresses to each network node and then routing the data in IP datagrams, or “packets,” from the source IP address to the destination IP address. FIG. 1 depicts an example of a client 110 (client A) at IP address 1 (IP1) and a server 130 (server W) at IP address 3 (IP3) that communicate between each other using 1P. In the example of FIG. 1, the client and server connect through an intermediate network 120 (i.e., an unspecified network, often referred to as a “network cloud”) and a router 122. As is known in IP, a portion of the IP address space is reserved for globally unique IP addresses. That is, IP addresses that are globally significant. The IP addresses that are not globally unique are only unique to the local network in which they are employed. In the example of FIG. 1, the client and server are identified by globally unique IP addresses. Throughout the description, similar reference numbers may be used to identify similar elements.
The number of globally unique IP addresses is a limited resource and the exponential growth of the Internet is continually shrinking the lot of available globally unique IP addresses. Because the lot of available globally unique IP addresses is a limited resource, there is a need to conserve the allocation of globally unique IP addresses. One technique, referred to as network address translation (NAT), that is used to preserve the limited number of globally unique IP addresses, involves establishing a single globally unique IP address as a virtual IP (VIP) address and then mapping the VIP address to multiple private (local) IP address within a private network domain. FIG. 2 depicts an example of a network in which NAT is used to connect client A to server W. As depicted in FIG. 2, the router 222 assumes the VIP address of IP3, which is the IP address that is the derived destination IP address of the client's communications. When the router receives IP datagrams destined for the VIP address, the router translates the VIP address to the real IP address of server W 230. For example, the router translates the VIP address, IP3, to the real IP4, of the server. Using NAT, the VIP address is the only globally unique IP address that is needed to enable various clients to reach network devices that are located beyond the router. Any other IP addresses beyond the VIP can be locally unique IP addresses that are reach utilizing NAT.
One common application of NAT involves connecting multiple servers, for example servers in a server farm, to the Internet. The multiple servers are connected through a single VIP address, thereby avoiding the need to allocate a globally unique IP address to each server in the server farm. The application of NAT can be further enhanced by intelligently establishing the sessions between the clients and servers such that the load on the servers is distributed in a desired manner. For example, the load of sessions can be distributed equally among the servers. One technique for load distribution, known as “Load Sharing using IP Network Address Translation (LSNAT),” is described in the IETC document RFC 2391 (August 1998), which is incorporated by reference herein. NAT may also include network address port translation (NAPT) as described in RFC 2391.
FIG. 3 depicts an example network in which LSNAT is implemented. The network includes two clients 310 and 312 (clients A and B) that are connected to servers W, X, Y, and Z 330, 332, 334, and 336 via an intermediate network 320 and a router 322. In the example of FIG. 3, the router assumes the VIP address, IP3, and manages the load distribution and translation functions between the clients and servers. Specifically, the router establishes connections, referred to herein as “sessions,” for communications between the clients and the servers in a manner that achieves a desired load distribution among the servers. In an embodiment, the sessions are established according to the transmission control protocol (TCP) or the user datagram protocol (UDP) protocols which reside at layer 4 of the open system interconnection (OSI) model as defined by the International Standards Organized (ISO). In an embodiment, each session is defined by a session binding, with each session binding identifying the client IP address, the client port number, the VIP address, the virtual port number, the real IP address, and the real port number. The session bindings are maintained by the router as part of the router's state information. In the example of FIG. 3 a session (session A) exists between client A and server W and a session (session B) exists between client B and server Y.
FIG. 4 depicts an example of the session bindings for sessions A and B as depicted in FIG. 3. With regard to session A, the session binding includes a client IP address IP1, a VIP address IP3, and a real IP address IP4. For example purposes the port numbers are all port 80. In a router, session bindings can be maintained for a period of time that depends on factors such as the available memory in the router, the volume of sessions processed by the router and/or QoS characteristics desired by the server operation. Maintenance of session bindings is desirable because the maintained sessions enable clients to return to same servers during each contact with the server farm. Returning to the same server can provide continuity to the client by, for example, enabling the client to access the same shopping cart during each contact with the server farm.
In order to provide protection against equipment failures, redundancy is often built into the networks. For example, a network may be built with a primary router that handles all of the traffic under normal conditions and a secondary router that waits in the background to handle traffic in the event of a failure of the primary router. FIG. 5 depicts an embodiment of a network, similar to the network described with reference to FIG. 3, which includes redundant routers 422 and 424 that connect clients A and B 410 and 412 to the servers W, X, Y and Z 430, 432, 434, and 436. In the example of FIG. 5, router A is the primary router and router B is the secondary router. The primary router is the active router that handles all of the traffic between the clients and the servers. As depicted in FIG. 5, while router A is active, the sessions, including sessions A and B, are run through router A. In addition, router A establishes all of the sessions between the clients and servers and maintains the set of session bindings. The secondary router is in standby mode and does not process incoming traffic. In addition, while in standby mode, the secondary router does not establish sessions or generate session bindings. In the embodiment of FIG. 5, both routers use the same VIP (i.e., VIP=IP3).
In the event of a failure of the primary router A, the traffic is switched over to the secondary router B. To achieve a “stateful failover” in the event of a failure of the primary router, the secondary router should have all of the same state information (i.e., the same session binding) as the primary router. A conventional technique that is used to achieve stateful failover between the primary and secondary routers involves periodically replicating the state information from the primary (active) router to the secondary (standby) router. That is, the state information at the primary router is periodically copied from the primary router to the secondary router. FIG. 6 depicts the replication of the state information from the primary (active) router 622 to the secondary (standby) router 624. Typically, replication is performed through a direct connection between the primary and secondary routers.
FIG. 7 depicts the network of FIG. 5 after a switchover from the primary router A 722 to the secondary router B 724 has occurred. As depicted in FIG. 7, sessions A and B are now supported by the secondary router B, which is now the active router. To achieve a stateful failover, the active session bindings that were being utilized by router A must be present in router B. If a stateful failover is achieved, the active sessions that were being supported by router A do not have to be re-established by router B.
Although redundant routers work well to provide failure protection and although the replication of sessions bindings from an active router to a standby router can achieve “stateful failover,” the use of redundant routers as described above with reference to FIGS. 5–7 is resource intensive and increases the cost of the network. Specifically, the secondary router, waiting in standby mode, does not increase the volume of traffic that can be handled between clients and servers, however, it requires the purchase and maintenance of two routers instead of only a single router. Being able to handle more traffic and/or increasing the rate at which traffic is processed can increase the value of a network.
In view of the inefficiencies of current failover protection techniques, what is needed is a failover protection technique that provides stateful failover and that makes efficient use of network resources.